<template>
	<view>
		<view v-if="lists.length!=0">
		<view class="as_item" v-for="(item,index) in lists" :key='index' @tap='toAsDetail(item.id)'>
			<view class="as_item_top">
				<text>售后时间：2022-04-13 11:40:06</text>
				<text style="position: absolute;right: 0rpx;">{{item.refundType=='REFUND'?'退款':'退货退款'}}</text>
			</view>
			<view class="as_item_good">
				<image src="https://aliyunoss.hntgov.net/image/2023/04/03/434bc1d204e14ed29ad56f88a89c2d22.jpg"></image>
				<view class="as_item_info">
					<view class="as_item_info_item">
						<text class="as_item_info_name">神秘湘西全域旅游年卡（24
小时发货，此商品不支持退此商品不支持退</text>
						<text
							style="font-size: 32rpx;color: #3D3D3D;position: absolute;right: 0rpx;">￥188.99</text>
					</view>
					<view class="as_item_info_item" style="margin-top: 20rpx;">
						<text class="as_item_info_type">类型：电子卡（我已阅读使用须知）</text>
						<text style="position: absolute;right: 0rpx;color: #AFA9A9;">x1</text>
					</view>
				</view>
			</view>
			<view style="width: 690rpx;height: 1rpx;background-color: #E7E6E6;margin-top: 20rpx;"></view>
			<view
				style="margin-top: 25rpx;font-size: 26rpx;color: #9C9C9C;position: relative;display: flex;align-items: center;"
				>
				<text>{{item.status=='WAITPROCESS'?'待处理':item.status=='AGRER'?'已同意':item.status=='REFUSE'?'已拒绝':item.status=='CANCEL'?'已取消':'已拒绝'}}</text>
				<view style="position: absolute;right: 0rpx;">	<u-icon name="arrow-right" ></u-icon></view>
			</view>
		</view>
		</view>
		<image v-else src="https://aliyunoss.hntgov.net/h5/list_nodata.png"
			style="width: 520rpx;height: 520rpx;margin-left:115rpx;"></image>
	</view>
</template>

<script>
	var that = ''
	export default {
		data() {
			return {
				lists: 10
			}
		},
		onLoad() {
			that = this
			this.getSaleAfterList()
		},
		onReady() {
			uni.setNavigationBarTitle({
				title: '售后列表'
			})
		},
		methods: {
			getSaleAfterList() {
				this.$u.api.queryAfterSalesList({}).then(res => {
					if (res) {
						this.lists=res
						console.log(this.lists);
					}
				})
			},
			toAsDetail(e) {
				uni.navigateTo({
					url: 'asdetail?id=' + e
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f7f7f7;
	}

	.as_item {
		width: 750rpx;
		background-color: #Fff;
		padding: 30rpx;
		margin-bottom: 20rpx;

		.as_item_top {
			font-size: 24rpx;
			position: relative;
		}
	}

	.as_item_good image {
		width: 144rpx;
		height: 144rpx;
		border-radius: 8rpx;
	}

	.as_item_good {
		margin-top: 48rpx;
		display: flex;



		.as_item_info {
			width: 524rpx;
			margin-left: 20rpx;
		}

		.as_item_info_item {
			display: flex;
			position: relative;
		}

		.as_item_info_name {
			width: 402rpx;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			overflow: hidden;
			-webkit-line-clamp: 2;
			color: #696969;
			font-size: 26rpx;
		}

		.as_item_info_type {
			color: #AFA9A9;
			font-size: 22rpx;
		}
	}
</style>
